﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using plas.core;

namespace plas.cps.ui
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            ApplicationHandler actual = ApplicationHandler.GetInstance();
            
            while (true)
            {
                StartForm sf = new StartForm(actual);
                Application.Run(sf);
                if (sf.DialogResult == DialogResult.OK)
                {
                    Form mf = (Form)actual.GetObject("mainForm");
                    Application.Run(mf);
                    if (mf.DialogResult == DialogResult.Cancel)
                        break;
                }
                else
                {
                    break;
                }
            }
        }
    }
}
